<!DOCTYPE html>
<html lang="en">

<head>
    {include file="common/meta_new" /}
    <script src="/static/js/layer/layer.js"></script>
    <style>
         .subbtn {
        margin: 0.54rem auto 0;
        width: 45%;
        height: 1.28rem;
        line-height: 1.28rem;
        border-radius: .64rem;
        text-align: center;
        background: #C6C7CB;
        color: #FFFFFF;
        font-size: .4267rem;
        font-weight: 500;
        display: inline-block;
</style>
</head>

<body>
    <input type="hidden" name="level" id="level" value="{$level}" />

    <input type="hidden" id="current_parent_user_product_num" value="0" />
    <input type="hidden" id="current_parent_user_order_amount" value="0" />

    <input type="hidden" id="current_company_store_product_num" value="0" />
    <input type="hidden" id="current_company_store_order_amount" value="0" />

    <input type="hidden" id="current_relation_line_product_num" value="0" />
    <input type="hidden" id="current_relation_line_order_amount" value="0" />

    <input type="hidden" id="order_amount" value="{$expert_upgrade_config['order_amount']}" />

    <input type="hidden" id="parent_user_product_num" value="{$expert_upgrade_config['parent_user_product_num']}" />
    <input type="hidden" id="parent_user_order_amount" value="{$expert_upgrade_config['parent_user_order_amount']}" />
    <input type="hidden" id="parent_user_buy_way" value="{$expert_upgrade_config['parent_user_buy_way']}" />

    <input type="hidden" id="company_store_product_num" value="{$expert_upgrade_config['company_store_product_num']}" />
    <input type="hidden" id="company_store_order_amount" value="{$expert_upgrade_config['company_store_order_amount']}" />
    <input type="hidden" id="company_store_buy_way" value="{$expert_upgrade_config['company_store_buy_way']}" />

    <input type="hidden" id="relation_line_product_num" value="{$expert_upgrade_config['relation_line_product_num']}" />
    <input type="hidden" id="relation_line_order_amount" value="{$expert_upgrade_config['relation_line_order_amount']}" />
    <input type="hidden" id="relation_line_buy_way" value="{$expert_upgrade_config['relation_line_buy_way']}" />

    <div id="app" class="hysj-page">
        <!-- header -->
        <div class="header">
            <div class="header-height"></div>
            <div class="header-wrap">
                <div class="header-content">
                    <div class="left">
                        <div class="go-back" url="index"><img src="/static/images/go-back.png" alt=""></div>
                        <div class="text">会员升级</div>
                    </div>
                    <div class="title"></div>
                </div>
            </div>
        </div>
        <!-- 顶部 -->
        <div class="top-wrap">
            <div class="bg-list">
                <img src="/static/images/hysj-bg1.png" alt="">
                <img src="/static/images/hysj-bg2.png" alt="">
                <img src="/static/images/hysj-bg3.png" alt="">
                <img src="/static/images/hysj-th1.png" alt="">
                <img src="/static/images/hysj-th2.png" alt="">
                <img src="/static/images/hysj-th3.png" alt="">
            </div>
            <div class="content">
                <div class="user-info">
                    <div class="left">
                        <img src="{$user['avatar']}" alt="">
                    </div>
                    <div class="right">
                        <div class="row-1">亲爱的{$user.nickname}，您好！</div>
                        <div class="row-2">恭喜您，您正在升级为
                            {if $level=="1"}一星达人{/if}
                            {if $level=="2"}二星达人{/if}
                            {if $level=="3"}三星达人{/if}
                        </div>
                    </div>
                </div>
                <div class="desc-wrap">
                    <div class="desc">请按以下步骤选择商品升级</div>
                    <div class="tips-box">说明</div>
                </div>
            </div>
        </div>
        <div class="product-wrap">
            <div class="product-box">
                <div class="title-wrap">
                    <img src="/static/images/egg.png" alt="">
                    <div class="title">① 请选择上级店铺商品</div>
                    <img src="/static/images/egg.png" alt="">
                </div>
                <div class="subtitle-wrap">数量：
                    {if $expert_upgrade_config["parent_user_buy_way"]=="1"}
                    <label><span id="selected_parent_user_num">0</span> / {$expert_upgrade_config["parent_user_product_num"]}</label>
                    {/if}
                    {if $expert_upgrade_config["parent_user_buy_way"]=="2"}
                    <label><span id="selected_parent_user_num">0</span> / 1-{$expert_upgrade_config["parent_user_product_num"]|default=0}</label>
                    {/if}
                    <span>金额：<label id="parent_user_order_amount_lable">0</label>/<label>{$expert_upgrade_config["parent_user_order_amount"]}
                        </label></span>
                </div>
                <div class="product-list">

                    {volist name="p1_goods_list" id="vo"}

                    <div class="product-item" id="product_item_{$vo.id}">
                        <div class="selected-img"><img src="/static/images/selected.png" alt=""></div>
                        <div class="product-image">
                            <img src="{$vo.cover}" alt="">
                        </div>
                        <div class="product-title ellipsis-1">{$vo.title}</div>
                        <div class="bottom">
                            <div class="left"><span>￥</span>{$vo.price}</div>
                            <div class="right">
                                <div class="minus-wrap" data-id="{$vo.id}" type="parent_user" data-buyway="{$expert_upgrade_config['parent_user_buy_way']}">
                                    <img class="out" src="/static/images/minus.png" alt="">
                                    <img class="in" src="/static/images/minus-in.png" alt="">
                                </div>
                                <div class="number" id="number_{$vo.id}" type="parent_user" data-goodsid="{$vo.id}"
                                    data-goodstype="1" data-price="{$vo['price']}" >
                                    0</div>
                                <div class="add-wrap" data-id="{$vo.id}" type="parent_user" data-buyway="{$expert_upgrade_config['parent_user_buy_way']}">
                                    <img class="out" src="/static/images/add.png" alt="">
                                    <img class="in" src="/static/images/add-in.png" alt="">
                                </div>
                            </div>
                        </div>
                    </div>

                    {/volist}

                </div>
            </div>
            <div class="product-box">
                <div class="title-wrap">
                    <img src="/static/images/egg.png" alt="">
                    <div class="title">② 请选择公司商品</div>
                    <img src="/static/images/egg.png" alt="">
                </div>
                <div class="subtitle-wrap">数量：
                    {if $expert_upgrade_config["company_store_buy_way"]=="1"}
                    <label><span id="selected_company_store_num">0</span> / {$expert_upgrade_config["company_store_product_num"]}</label>
                    {/if}
                    {if $expert_upgrade_config["company_store_buy_way"]=="2"}
                    <label><span id="selected_company_store_num">0</span> / 1-{$expert_upgrade_config["company_store_product_num"]}</label>
                    {/if}
                    <span>金额：<label id="company_store_order_amount_lable">0</label>/<label>{$expert_upgrade_config["company_store_order_amount"]}</label></span>
                </div>
                <div class="product-list">


                    {volist name="p2_goods_list" id="vo"}

                    <div class="product-item" id="product_item_{$vo.id}">
                        <div class="selected-img"><img src="/static/images/selected.png" alt=""></div>
                        <div class="product-image">
                            <img src="{$vo.cover}" alt="">
                        </div>
                        <div class="product-title ellipsis-1">{$vo.title}</div>
                        <div class="bottom">
                            <div class="left"><span>￥</span>{$vo.price}</div>
                            <div class="right">
                                <div class="minus-wrap" data-id="{$vo.id}" type="company_store" data-buyway="{$expert_upgrade_config['company_store_buy_way']}">
                                    <img class="out" src="/static/images/minus.png" alt="">
                                    <img class="in" src="/static/images/minus-in.png" alt="">
                                </div>
                                <div class="number" id="number_{$vo.id}" type="company_store" data-goodsid="{$vo.id}"
                                    data-goodstype="2" data-price="{$vo['price']}" >0</div>
                                <div class="add-wrap" data-id="{$vo.id}" type="company_store" data-buyway="{$expert_upgrade_config['company_store_buy_way']}" >
                                    <img class="out" src="/static/images/add.png" alt="">
                                    <img class="in" src="/static/images/add-in.png" alt="">
                                </div>
                            </div>
                        </div>
                    </div>

                    {/volist}

                </div>
            </div>
            <div class="product-box">
                <div class="title-wrap">
                    <img src="/static/images/egg.png" alt="">
                    <div class="title">③ 请选择级别商品</div>
                    <img src="/static/images/egg.png" alt="">
                </div>
                <div class="subtitle-wrap">数量： 
                    {if $expert_upgrade_config["relation_line_buy_way"]=="1"}
                    <label><span id="selected_relation_line_num">0</span> / {$expert_upgrade_config["relation_line_product_num"]}</label>
                    {/if}
                    {if $expert_upgrade_config["relation_line_buy_way"]=="2"}
                    <label><span id="selected_relation_line_num">0</span> / 1-{$expert_upgrade_config["relation_line_product_num"]}</label>
                    {/if}
                    <span>金额：<label id="relation_line_order_amount_lable">0</label>/<label
                            id="relation_line_order_amount_config">{$expert_upgrade_config["relation_line_order_amount"]}
                        </label></span>
                </div>
                <div class="product-list">

                    {volist name="p3_goods_list" id="vo"}

                    <div class="product-item" id="product_item_{$vo.id}">
                        <div class="selected-img"><img src="/static/images/selected.png" alt=""></div>
                        <div class="product-image">
                            <img src="{$vo.cover}" alt="">
                        </div>
                        <div class="product-title ellipsis-1">{$vo.title}</div>
                        <div class="bottom">
                            <div class="left"><span>￥</span>{$vo.price}</div>
                            <div class="right">
                                <div class="minus-wrap" data-id="{$vo.id}" type="relation_line" data-buyway="{$expert_upgrade_config['relation_line_buy_way']}" >
                                    <img class="out" src="/static/images/minus.png" alt="">
                                    <img class="in" src="/static/images/minus-in.png" alt="">
                                </div>
                                <div class="number" id="number_{$vo.id}" type="relation_line" data-goodsid="{$vo.id}"
                                    data-goodstype="3" data-price="{$vo['price']}" >0</div>
                                <div class="add-wrap" data-id="{$vo.id}" type="relation_line" data-buyway="{$expert_upgrade_config['relation_line_buy_way']}" >
                                    <img class="out" src="/static/images/add.png" alt="">
                                    <img class="in" src="/static/images/add-in.png" alt="">
                                </div>
                            </div>
                        </div>
                    </div>

                    {/volist}

                </div>
            </div>
        </div>
        
        <div style="width: 100%;text-align: center" >
            <div  onclick="orderSkip()" class="subbtn" style="background-color: #2493F1;">跳过</div>
            <div class=" commit-btn subbtn">确定</div>
                
        </div>
    </div>
    <script src="/static/js/common.js"></script>
    <script src="/static/js/expert/choose.js?v={:rand()}" ></script>
    <script>
        function orderSkip(){
            $.get("{:url('index/expert/orderSkip');}",{"level":"{$level}"},function(ret){
                if(ret.code==1){
                       location.href = "{:url('index/task/upgrade')}";
                    
                }else{
                    if(ret.msg){
                        layer.msg(ret.msg, {icon: 1, time: 3000, shade: 0.4}, function () {
        //                    location.reload();
                        });
                    }
                    window.location = ret.url;
                     
                }
            },'json');
//             window.location = "/index/expert/orderSkip?level={$level}";
             
        }
    </script>
</body>

</html>